RegisterWindow
TheRegisterWindow
method creates an OpenDoc window object and root frame for the specified platform-specific window.
ODWindow RegisterWindow (in ODPlatformWindow newWindow, in ODType frameType, in ODBoolean isRootWindow, in ODBoolean isResizable, in ODBoolean isFloating, in ODBoolean shouldSave, in ODBoolean shouldDispose, in ODPart rootPart, in ODTypeToken viewType, in ODTypeToken presentation, in ODFrame sourceFrame);
newWindow
- A 32-bit value identifying a platform-specific window. On the Mac OS platform, this parameter is a window pointer (type
WindowPtr
).frameType
- The type of root frame for the window object. The frame type must be either regular frame (
kODFrameObject
) or nonpersistent frame (kODNonPersistentFrameObject
).isRootWindow
- kODTrue if the window object is to be a root window, otherwise
kODFalse
.isResizable
- kODTrue if the window object is to be resizable, otherwise
kODFalse
.isFloating
kODTrue
if the window object is to be a floating window, otherwisekODFalse
.shouldSave
kODTrue
if the window object is to be saved in its draft, otherwisekODFalse
.shouldDispose
- kODTrue if the platform window should be disposed of when the window object is deleted, otherwise
kODFalse
.rootPart
- A reference to the part associated with the root frame of the window.
viewType
- A tokenized string representing the view type for the root frame of the window.
presentation
- A tokenized string representing the presentation type for the root frame of the window.
sourceFrame
- A reference to the frame from which the window object was opened (used when an embedded frame is opened into a window), or
kODNULL
if the frame does not exist.- return value
- A reference to the newly created window object.
DISCUSSION
Your part calls this method to create a window object when there is no pre-existing root frame. You should create the platform-specific window as invisible. After calling this method, you should call theShow
method of the returned window to make it visible.The
viewType
parameter must be the tokenized form of one of the view-type constants (kODViewAsFrame
,kODViewAsLargeIcon
,kODViewAsSmallIcon
, orkODViewAsThumbnail
). You can call the session object'sTokenize
method to obtain a token corresponding to one of these constants.This method initializes the reference count of the returned window. When you have finished using that window, you should call its
Release
method.EXCEPTIONS
kODErrCannotCreateWindow
- There is not enough memory to create the new window object.
SEE ALSO
TheODType
type (page 876).
TheODTypeToken
type (page 877).
TheODSession::Tokenize
method (page 622).
TheODWindow::Show
method (page 837).
TheODWindowState::RegisterWindowForFrame
method (page 867).
Listing 2-8 on page 51 in OpenDoc Cookbook.
"Creating and Registering a Window" on page 224 in OpenDoc Programmer's Guide.
"The Open Method of Your Part Editor" on page 228 in OpenDoc Programmer's Guide.
"Handling a Movable Modal Dialog Box" on page 234 in OpenDoc Programmer's Guide.
"Showing the Dialog Box" on page 235 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help